package com.yehangtech.designpattern.行为型_中介者模式.service.impl;

import com.yehangtech.designpattern.行为型_中介者模式.service.api.Mediator;
import com.yehangtech.designpattern.行为型_中介者模式.service.api.Person;

//具体-人 承租人
public class Tenant extends Person {
    public Tenant(String name, Mediator mediator) {
        super(name, mediator);
    }

    //与中介者联系
    public void constact(String message) {
        mediator.constact(message, this);
    }

    //获取信息
    public void getMessage(String message) {
        System.out.println("租房者" + name + "获取到的信息：" + message);
    }
}
